<template>
    <view class="circle-progress-container">
		<view class="list">
			<uni-list>
				<uni-list-item v-for="(item,index) in itemLst" :key="item.orderId" :title="item.userName + '  '  + (index+1)" showArrow
					clickable @click="goOrderDetail(item.orderId)"></uni-list-item>
			</uni-list>
		</view>
		<!-- <LCircularProgress
			:lineWidth="30"
			:bgColor="'#CCCCCC'"
			:type="'circular'"
			:fontSize="20"
			:fontColor="'#008cff'"
			:percent="60"
		/> -->
    </view>
</template>
  
<script>
	import api from '@/utils/api.js'
	import LCircularProgress from '@/components/l-circularProgress/l-circularProgress.vue'
	export default {
		components: { LCircularProgress },
		data(){
			return {
				itemLst: []
			}
		},
		mounted() {
			this.getOrder()
		},
		methods: {
			goOrderDetail(orderId) {
				uni.navigateTo({
					url: `/pages/orderDetail/orderDetail?orderId=${orderId}`
				})
			},
			async getOrder() {
				try {
					await api.orderInfoList({"curPage":1, "pageSize":20}).then(res => {
						this.itemLst = res.data.itemLst
					})
				}catch (error) {
					console.log('error', error);
				}
			}
		},
		// 分享给朋友
		onShareAppMessage() {
			return {
				title: '我的订单 - 飞手之家',
				path: '/pages/learningProgress/learningProgress',
				imageUrl: '/static/images/head.jpg'
			};
		},
		// 分享到朋友圈
		onShareTimeline() {
			return {
				title: '我的订单 - 飞手之家',
				query: '',
				imageUrl: '/static/images/head.jpg'
			};
		}
	}
</script>
  
<style lang="scss" scoped>
	.circle-progress-container {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		.list {
			width: 90%;
			margin: 0 auto;
			margin-top: 12px;
		}
	}
</style>
  